function themeChange(value) {
  let mode = value.mode || "tint";
  let theme = value.theme || "purple";
  let mc = document.querySelector("body");
  if (mc) {
    mc.className = `${mode} ${theme}`
  };
}
window.addEventListener(
  "message",
  (e) => {
    if (e.data && typeof e.data === 'string' && e.data.indexOf('{') > -1) {
      themeChange(JSON.parse(e.data));
    }
  },
  false
);